package com.example.business_oa.service;

import com.example.comment_oa.dubbo.PositiveServiceDubbo;
import com.example.comment_oa.pojos.Positive;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class ZfPositiveService {
    @DubboReference(version = "1.0.0")
    PositiveServiceDubbo positiveServiceDubbo;


    //转正申请流程
    @GlobalTransactional(timeoutMills = 300000)
    public int insertadd(Positive positive) {
        int i = positiveServiceDubbo.insertadd(positive);
        return i;
    }
    //转正审批成功
    @GlobalTransactional(timeoutMills = 300000)
    public int posState(String posName, String posBianhao) {
        int i = positiveServiceDubbo.posState(posName, posBianhao);
        return i;
    }

    //转正审批失败
    @GlobalTransactional(timeoutMills = 300000)
    public int posStates(String posName, String posBianhao) {
        int i = positiveServiceDubbo.posStates(posName, posBianhao);
        return i;
    }
}
